import Vue from 'vue'
import Vuex from 'vuex'
import * as actions from './actions'
import amap from './modules/amap'

Vue.use(Vuex)

// 定义全局state
const state = {
  app: {
    showList: false
  }
}

// 定义同步操作
const mutations = {
  // 设置show list
  APP_SET_SHOW_LIST (state) {
    state.app.showList = true
  },
  // 设置show list
  APP_SET_SHOW_MAP (state) {
    state.app.showList = false
  }
}

// 获取active note
// const getters = {
//   activeNote: state => state.activeNote
// }

export default new Vuex.Store({
  state,
  mutations,
  modules: {
    amap
  },
  actions
  // getters
})
